package com.cskaoyan.controller.wx;

import com.cskaoyan.bean.BaseRespVo;
import com.cskaoyan.bean.wx.vo.WxHomeIndexVo;
import com.cskaoyan.service.GoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

@RestController
@RequestMapping("wx/home")
public class WxHomeIndexController {
    @Autowired
    GoodsService goodsService;

    @RequestMapping("index")
    public BaseRespVo index(HttpServletRequest req){

        WxHomeIndexVo wxHomeIndexVo = goodsService.selectIndex(req);
        return BaseRespVo.ok(wxHomeIndexVo);
    }

}
